﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Crm.Sdk.Messages;

namespace XrmLibrary.Extensions
{
    public static class WhoAmIExtensions
    {
        /// <summary>
        /// Gets the details of the WhoAmIResponse in String format.
        /// </summary>
        /// <param name="response">The response.</param>
        /// <returns></returns>
        public static String GetDetails(this WhoAmIResponse response)
        {
            return String.Format("UserId: {0}, OrganizationId: {1}, BusinessUnitId: {2}", response.UserId, response.OrganizationId, response.BusinessUnitId);
        }
    }
}
